<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ExoCellRendererIcon: exo Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="exo Reference Manual">
<link rel="up" href="exo-cell-renderers.html" title="Part III. Additional cell renderers">
<link rel="prev" href="exo-cell-renderers.html" title="Part III. Additional cell renderers">
<link rel="next" href="exo-jobs.html" title="Part IV. Framework for threaded/asynchronous jobs">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#ExoCellRendererIcon.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#ExoCellRendererIcon.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#ExoCellRendererIcon.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="exo-cell-renderers.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="exo-cell-renderers.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="exo-jobs.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ExoCellRendererIcon"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ExoCellRendererIcon.top_of_page"></a>ExoCellRendererIcon</span></h2>
<p>ExoCellRendererIcon — Renders an icon in a cell</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ExoCellRendererIcon.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody><tr>
<td class="function_type">
<span class="returnvalue">GtkCellRenderer</span> *
</td>
<td class="function_name">
<a class="link" href="ExoCellRendererIcon.html#exo-cell-renderer-icon-new" title="exo_cell_renderer_icon_new ()">exo_cell_renderer_icon_new</a> <span class="c_punctuation">()</span>
</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon--follow-state" title="The “follow-state” property">follow-state</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
<tr>
<td class="property_type">
<span class="type">GIcon</span> *</td>
<td class="property_name"><a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon--gicon" title="The “gicon” property">gicon</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon--icon" title="The “icon” property">icon</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon--size" title="The “size” property">size</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon-struct" title="struct ExoCellRendererIcon">ExoCellRendererIcon</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GInitiallyUnowned
        <span class="lineart">╰──</span> GtkCellRenderer
            <span class="lineart">╰──</span> ExoCellRendererIcon
</pre>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;exo/exo.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.description"></a><h2>Description</h2>
<p>An <a class="link" href="ExoCellRendererIcon.html" title="ExoCellRendererIcon"><span class="type">ExoCellRendererIcon</span></a> can be used to render an icon in a cell. It
allows to render either a named icon, which is looked up using the
<span class="type">GtkIconTheme</span>, or an image file loaded from the file system. The icon
name or absolute path to the image file is set via the</p>
<a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon--icon" title="The “icon” property">icon</a> property.
<p>To support the <a class="link" href="ExoIconView.html" title="ExoIconView">ExoIconView</a> (and GtkIconView), <a class="link" href="ExoCellRendererIcon.html" title="ExoCellRendererIcon"><span class="type">ExoCellRendererIcon</span></a> supports
rendering icons based on the state of the view if the</p>
<a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon--follow-state" title="The “follow-state” property">follow-state</a><p>property is set.</p>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="exo-cell-renderer-icon-new"></a><h3>exo_cell_renderer_icon_new ()</h3>
<pre class="programlisting"><span class="returnvalue">GtkCellRenderer</span> *
exo_cell_renderer_icon_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="ExoCellRendererIcon.html" title="ExoCellRendererIcon"><span class="type">ExoCellRendererIcon</span></a>. Adjust rendering parameters using object properties,
which can be set globally via <code class="function">g_object_set()</code>. Also, with <span class="type">GtkCellLayout</span> and
<span class="type">GtkTreeViewColumn</span>, you can bind a property to a value in a <span class="type">GtkTreeModel</span>. For example
you can bind the <a class="link" href="ExoCellRendererIcon.html#ExoCellRendererIcon--icon" title="The “icon” property">icon</a> property on the
cell renderer to an icon name in the model, thus rendering a different icon in each row
of the <span class="type">GtkTreeView</span>.</p>
<div class="refsect3">
<a name="exo-cell-renderer-icon-new.returns"></a><h4>Returns</h4>
<p> the newly allocated <a class="link" href="ExoCellRendererIcon.html" title="ExoCellRendererIcon"><span class="type">ExoCellRendererIcon</span></a>.</p>
</div>
<p class="since">Since: <a class="link" href="ch01.html#api-index-0.3.1.9" title="Added in 0.3.1.9">0.3.1.9</a></p>
</div>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ExoCellRendererIcon-struct"></a><h3>struct ExoCellRendererIcon</h3>
<pre class="programlisting">struct ExoCellRendererIcon;</pre>
<p>The <a class="link" href="ExoIconChooserDialog.html" title="ExoIconChooserDialog"><span class="type">ExoIconChooserDialog</span></a> struct contains only private fields and
should not be directly accessed.</p>
</div>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="ExoCellRendererIcon--follow-state"></a><h3>The <code class="literal">“follow-state”</code> property</h3>
<pre class="programlisting">  “follow-state”             <span class="type">gboolean</span></pre>
<p>Specifies whether the icon renderer should render icon based on the
selection state of the items. This is necessary for <a class="link" href="ExoIconView.html" title="ExoIconView"><span class="type">ExoIconView</span></a>,
which doesn't draw any item state indicators itself.</p>
<p>Owner: ExoCellRendererIcon</p>
<p>Flags: Read / Write / Construct</p>
<p>Default value: TRUE</p>
<p class="since">Since: <a class="link" href="ch01.html#api-index-0.3.1.9" title="Added in 0.3.1.9">0.3.1.9</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ExoCellRendererIcon--gicon"></a><h3>The <code class="literal">“gicon”</code> property</h3>
<pre class="programlisting">  “gicon”                    <span class="type">GIcon</span> *</pre>
<p>The <span class="type">GIcon</span> to render. May also be <code class="literal">NULL</code> in which case no icon will be
rendered for the cell.</p>
<p>Currently only <span class="type">GThemedIcon</span>s are supported which are loaded
using the current icon theme.</p>
<p>Owner: ExoCellRendererIcon</p>
<p>Flags: Read / Write</p>
<p class="since">Since: <a class="link" href="ch01.html#api-index-0.4.0" title="Added in 0.4.0">0.4.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ExoCellRendererIcon--icon"></a><h3>The <code class="literal">“icon”</code> property</h3>
<pre class="programlisting">  “icon”                     <span class="type">gchar</span> *</pre>
<p>The name of the themed icon to render or an absolute path to an image file
to render. May also be <code class="literal">NULL</code> in which case no icon will be rendered for the
cell.</p>
<p>Image files are loaded via the thumbnail database, creating a thumbnail
as necessary. The thumbnail database is also used to load scalable icons
in the icon theme, because loading scalable icons is quite expensive
these days.</p>
<p>Owner: ExoCellRendererIcon</p>
<p>Flags: Read / Write</p>
<p>Default value: NULL</p>
<p class="since">Since: <a class="link" href="ch01.html#api-index-0.3.1.9" title="Added in 0.3.1.9">0.3.1.9</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ExoCellRendererIcon--size"></a><h3>The <code class="literal">“size”</code> property</h3>
<pre class="programlisting">  “size”                     <span class="type">gint</span></pre>
<p>The size in pixel at which to render the icon. This is also the fixed
size that the renderer will request no matter if the actual icons are
smaller than this size.</p>
<p>This improves the performance of the layouting in the icon and tree
view, because during the layouting phase no icons will need to be
loaded, but the icons will only be loaded when they need to be rendered,
i.e. the view scrolls to the cell.</p>
<p>Owner: ExoCellRendererIcon</p>
<p>Flags: Read / Write / Construct</p>
<p>Allowed values: &gt;= 1</p>
<p>Default value: 48</p>
<p class="since">Since: <a class="link" href="ch01.html#api-index-0.3.1.9" title="Added in 0.3.1.9">0.3.1.9</a></p>
</div>
</div>
<div class="refsect1">
<a name="ExoCellRendererIcon.see-also"></a><h2>See Also</h2>
<a class="link" href="ExoIconView.html" title="ExoIconView">ExoIconView</a>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>